package com.item.read.util;

import java.io.*;

public class InputReadUtils {

    public static String readString(String url){
        return null;
    }
    public static String readString(InputStream in){

        try {
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in,"UTF-8"));

            StringBuffer sb = new StringBuffer();
            String line = null;
            while ((line = bufferedReader.readLine()) != null){
                sb.append(line);
            }
            bufferedReader.close();
            return sb.toString();
        } catch (IOException e) {
             e.printStackTrace();
        }finally {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return null;
    }

}
